<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            /* 盒子尺寸 = width或者heigt + 边框线 */
            width: 400px;
            height: 400px;
            border: 10px solid black;
            background-color: green;
        }
    </style>
</head>
<body>

    <div>文字</div>
    
</body>
</html>